<?php

class InteractionTable extends Doctrine_Table
{
	public static function socialLogin($params){

		$interaction = Doctrine::getTable('Interaction')->findOneBy('identifier', $params['identifier']);

		if(!$interaction){
			$interaction = new Interaction();
		}

		$interaction->fill($params);
		$interaction->save();

		return $interaction;
	}
}
